package com.ls.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ls.domain.Confirm;
import com.ls.domain.Message;
import com.ls.mapper.ConfirmMapper;
import com.ls.service.ConfirmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = RuntimeException.class)
public class ConfirmServiceImpl extends ServiceImpl<ConfirmMapper, Confirm> implements ConfirmService {
    @Autowired
    private ConfirmMapper confirmMapper;
    @Override
    public List<Message> selectBySid(Integer sid, int startIndex, int pageSize) {
        return confirmMapper.selectBySid(sid, startIndex, pageSize);
    }

    @Override
    public int selectBySidCount(Integer sid) {
        return confirmMapper.selectBySidCount(sid);
    }

    @Override
    public List<Message> selectBySidConditions(Integer sid, String messageTitle, int startIndex, int pageSize) {
        return confirmMapper.selectBySidConditions(sid, messageTitle,startIndex,pageSize);
    }

    @Override
    public int selectBySidConditionsCount(Integer sid, String messageTitle) {
        return confirmMapper.selectBySidConditionsCount(sid,messageTitle);
    }
}
